home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: judgemi@ix.netcom.com (Michael Judge)
- Newsgroups: comp.lang.c++
- Subject: Re: visual c++: #undef
- Date: 15 Feb 1996 13:57:14 GMT
- Organization: TSI
- Message-ID: <4fve3q$eva@cloner2.ix.netcom.com>
- References: <DMsrJE.7GI@info.uucp>
- NNTP-Posting-Host: ix-bst-ma2-11.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-NETCOM-Date: Thu Feb 15 5:57:14 AM PST 1996
- X-Newsreader: WinVN 0.99.7
-
- In article <DMsrJE.7GI@info.uucp>, body2872@mach1.wlu.ca says...
- >
- >
- >my #undefs cause Visual C++ (2.2) to give warnings, yet it fine in
- >Borland C++
- >
- >
- >i use it inside the function with first
- >#define LA
- >..code
- >#undef LA
- >
- >or with #define and #undef between functions, and i always the warning
- >that
- >"unexpected characters following #undef; newline expected"
- >but there are no unexpected characters there, just
- >eg. #undef ROWCOL(i)
-
- the problem here is that you are undefining a MACRO. just say
-
- #define ROWCOL(i) ((i)*(i))
- .
- .
- .
- #undef ROWCOL
-
- I dont think the #undef ROWCOL(i) is necessary
-
- MJ
-
-